home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / quicktime / goodies / qtmissingcomp.win / qtmissingcomp.c next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  998 b   |  45 lines

  1. //////////
  2. //
  3. //    File:        QTMissingComp.c
  4. //
  5. //    Contains:    Sample code for detecting missing QuickTime components.
  6. //
  7. //    Written by:    Tim Monroe
  8. //
  9. //    Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //    Change History (most recent first):
  12. //
  13. //       <1>         03/24/99    rtm        first file
  14. //     
  15. //////////
  16.  
  17. #include "QTMissingComp.h"
  18.  
  19.  
  20. //////////
  21. //
  22. // QTMissing_IsComponentOfTypeAvailable
  23. // Is the component with the specified type and subtype available?
  24. //
  25. //////////
  26.  
  27. Boolean QTMissing_IsComponentOfTypeAvailable (OSType theType, OSType theSubType)
  28. {
  29.     ComponentDescription        myCompDesc;
  30.     Component                    myComponent = NULL;
  31.  
  32.     // look for the specified component
  33.     myCompDesc.componentType = theType;
  34.     myCompDesc.componentSubType = theSubType;
  35.     myCompDesc.componentManufacturer = 0;
  36.     myCompDesc.componentFlags = 0;
  37.     myCompDesc.componentFlagsMask = cmpIsMissing;
  38.     
  39.     myComponent = FindNextComponent(NULL, &myCompDesc);
  40.  
  41.     return(myComponent != NULL);
  42. }
  43.  
  44.  
  45.